<div class="pager_prevnext">
<?php if (isset($this->description['http://lod2.eu/schema/previous'][0]['value'])):
    $previousResourceUri = $this->description['http://lod2.eu/schema/previous'][0]['value'];
    $previousResource = new OntoWiki_Resource($previousResourceUri, OntoWiki::getInstance()->selectedModel);
    $fullDescription = $previousResource->getDescription();
?>
    <a href="<?php echo $this->url($previousResourceUri); ?>">
        <span class="pager_arrow" title="Previous: <?php echo htmlspecialchars($previousResource->getTitle()) ?>">&larr;</span>
        <span class="hideme">Previous: <?php echo $previousResource->getTitle() ?></span>
    </a>
<?php endif; ?>

<?php if (isset($this->description['http://lod2.eu/schema/next'][0]['value'])):
    $nextResourceUri = $this->description['http://lod2.eu/schema/next'][0]['value'];
    $nextResource = new OntoWiki_Resource($nextResourceUri, OntoWiki::getInstance()->selectedModel);
    $fullDescription = $nextResource->getDescription();
?>
    <a href="<?php echo $this->url($nextResourceUri) ?>">
        <span class="pager_arrow" title="Next: <?php echo htmlspecialchars($nextResource->getTitle()) ?>">&rarr;</span>
        <span class="hideme">Next: <?php echo $nextResource->getTitle() ?></span>
    </a>
<?php endif; ?>
</div>